Copyright: Copyright ® 1995, The Bridge, Inc.


Contents
 Holiday Calendar - Contents

Holiday Calendar Overview

Read Me First
Keyboard
Holiday Description
Calendar Menu

Holiday Database
Holiday Schedule
Holiday Calendar - Technical Information

The Demo Programs
Simple Linkage to Holiday Calendar

Registering or Ordering the Holiday Calendar
Holiday Calendar - Demo Version License
Holiday Calendar - Registered User License

About the Holiday Calendar
Development History
System Components
Other Products

 Inc.
913 Hacienda Way
Millbrae, CA  94030

CompuServe 71662,205
415-737-0870
Fax: 415-737-0871
Copyright 1995

Last Updated: March 9, 1995

Version Information

Last updated: March 9, 1995  23:56:45

Version: 2.00

Version Date: March 1995


Calendar Overview
Holiday Calendar Overview

The Holiday Calendar displays a computer generated calendar and, if desired, maintains a "holiday schedule" in a Microsoft Access database.  The Holiday Calendar can be used as a "stand-alone" application or "linked" to other applications.

Calendar - Stand-Alone

You can use the Holiday Calendar as a "stand-alone" system.  For example: add the Holiday Calendar to your Window's Startup Group specifying that it is to Run Minimized.  While minimized it displays the time and date:

Restore the calendar by double-clicking on its icon when you need to refer to it.

Calendar - Embedded System

The Holiday Calendar can be linked to another application.  You can display the calendar, select a date then pass, via Windows Dynamic Data Exchange [DDE], the selected date to the application.  The date is passed from the calendar each time you select a date.  The date can be displayed in the appropriate field in the application or used for additional application processing.

For example: You wish to reserve a room on a specific date but don't have a calendar handy.  You display this calendar, search for the appropriate date, click on the date, then let the calendar routines place the date in the application's date field.

Short-cut Keys

A number of short-cut keys allow you to quickly search the calendar by moving forward or backward days, months, or years.  For example: pressing the Home key sets the date to the first day of the month, Shift-Home sets it to the first day of the year.  The short-cut keys are described in the Calendar Menu.

See also: Keyboard for a sample calendar layout.

Holiday Schedule

A holiday's description and date can be stored in a Microsoft Access database.  For example: You can enter recurring and unique holidays and have these holiday dates displayed on the Calendar.  A "tool tip" type holiday description is displayed as the mouse moves over a holiday, for example:

See: Holiday Schedule for details.


Read Me First
Read Me First - Tour the Holiday Calendar

The Holiday Calendar can be used as a "stand-alone" application or "linked" with your applications.  Take a Tour by performing the following functions:

Run the Holiday Calendar

1.	Start the Holiday Calendar.  Launch HolCal.Exe from the Windows Program Manager, File Manager or similar utility.

2.	An evaluation agreement is displayed the first [and only] time you start the calendar.  Thereafter a "days remaining" message is issued upon startup.  A reminder to register message is displayed at the top of the screen.  It goes away after about 10 minutes.

3.	If the system cannot find the holiday database it will prompt you for its location.

Change Dates

4.	Click on the calendar to change the date.  The selected date is shown as an indented box using the Highlight system colors.  Press "T" to return to Today.  The title bar caption shows the selected date.  [Note: The computer's system date is not changed.]

5.	Press the cursor movement keys [up, down, left and right arrow keys] to move forward, or backward in the calendar.

6.	Press the page-up, page-down, home and end keys.  Then use the same keys while holding down the shift key to see how you can jump from day-to-day, month-to-month and year-to-year.

7.	Move forward or backward a month or a year by clicking the left [image] or right [image] month or year buttons.

Short-Cut Keys

8.	Move the mouse over a holiday.  Holidays are displayed in the Active Title Bar colors.  Not every month has a holiday.  You may need to move to a month with a holiday.  The name of the holiday is shown, for example:

9.	Open [image] by pressing "S".  Enter a new date then press Enter.  The selected date is displayed.

10.	Click the menu button [image].  A popup menu is displayed.  Press Esc to close the menu.

11.	Display the calendar with or without a title by pressing Ctrl-B.  You can move the calendar by dragging the title ifit is displayed or by dragging any empty date box if the title is not displayed.

12.	Set the calendar to be "Always On Top" by pressing Ctrl-A.  Reverse that action by pressing Ctrl-A again.  While set to "Always On Top" the calendar will peek through other applications.

13.	Turn the display of holidays on or off by pressing Ctrl-H.  If you turn them off the holiday database will no longer be accessed.  In that case, the Holiday Calendar becomes a calendar with DDE support.

14.	Center the calendar on the screen by pressing "C", return it to its previous position with "R" [or "C"].

15.	Minimize the calendar by pressing "M".  The current date and time are shown.  The time is updated every two seconds.  Format is the International "short date and time".

Holiday Grid

16.	Press "H" to display the holiday database grid.  Try adding, then deleting a holiday.

17.	Sort the holidays in a different sequence.

18.	Select holidays according to the selection criteria shown in the Selection menu.

19.	Return to the calendar by clicking the Close button.

Terminate

20.	Press Ctrl-F4 to terminate the Holiday Calendar and save settings in the HolCal.Ini file.  The file is stored in your Windows directory.

Run the More Elaborate Demo

1.	Two demo programs are provided with the Holiday Calendar - HolDmo and a simpler version HolSmpl.  First run HolDmo.Exe. using Program or File Manager.

2.	The demo attempts to link to the calendar as it is starting.  If the Holiday Calendar is not already running click the start calendar button [the button with a picture of a calendar] to make the link.

3.	Experiment by sending dates from and to HolDmo and the Holiday Calendar.  Dates are passed in the text box, status information is passed in the status label.  Messages from the linkage routines are displayed in the Message label.

4.	Close the demo by clicking the Exit button.  If the demo started the calendar it will send a termination message causing the calendar to terminate.

Run the Simple Linkage Program

Perform the following steps to run the "simple" demo:

1.	Start Visual Basic.  Open project HolSmpl.Mak.

2.	Run the program by pressing F5.

3.	Examine HolSmpl.Frm's source code.  Take note of the linkage to the HCL_LinkToCalendar function.

Add Linkage to an Application

Lastly you should add calendar linkage to one of your applications.

1.	Use Visual Basic to load your application's project [.mak] file.

2.	Add module HolLink.Bas to your application.

3.	Add one text box and two labels to a form in your application.  They can be Visible or not.  They need not be shown to the user.

4.	Use the sample linkage shown in HolSmpl.Frm  to link to the HCL_LinkToCalendar function.

5.	Run your application.  Pass dates between your application and the Holiday Calendar.

It's just that simple!!

Review this Help File

You should review the remainder of this help file.  Click [image] to sequentially review help file.


Keyboard

You can use short-cut keys to select a desired date, or move the mouse cursor to the desired date then click either mouse button.

Click [image] or press the period (.) key to display a menu of options.

Click on the following calendar graphic to pop up information about that item.  There are three hot spots on this graphic.


Holiday Description

Holidays are displayed using the Active Title Bar colors.  A description of the holiday is displayed when the mouse is moved over the holiday, for example:

If there is more than one holiday on the same day then a multi-line description is displayed, for example:


Calendar Menu

Click [image] or press the period (.) key to display a menu.

You can jump to a desired date from the menu or you can use a short-cut key.  For example: pressing "T" will cause today's date to be selected.

Click on the following menu to pop up information about that item.  There are six hot spots on this graphic.


Holiday Database

Holiday information is stored in a Microsoft Access database named "holcal.mdb".  The calendar attempts to locate the database while opening it.  The following message is issued if the database can't be found:

Click Exit to quit.

Click Skip to display the calendar without holidays.  You can use the calendar menu to start displaying holidays at a later time.

Click Browse to display the following dialog:

Select the database's path then click OK to continue, or click Cancel to skip the display of holiday information.

Security Restrictions

The distributed sample database can be modified by any user - there are no security restrictions.  You will probably want to restrict your user's ability to modify the database.  Standard Microsoft Access security restrictions could be added.  See Access documentation for details.


Holiday Schedule

Holiday information can be changed by typing new entries on the grid.  Store this information in the database by moving to a different row.  The changed, but not yet updated information, is displayed in red.

The holiday information is displayed on a TrueGrid grid.  Refer to the TrueGrid documentation for details.  See: Holiday Calendar - Technical Information for additional information about TrueGrid.

Add a holiday by clicking the Add button.  Delete a holiday by clicking the Delete button.

The product is distributed with a list of holidays for the current year.  You will want to modify adding or deleting holidays observed by your organization.

Click on the Holiday form to pop up information about the use of the form.  There are 15 hot spots on this graphic, including the menu items.


Holiday Calendar - Technical Information

Visual Basic

The Holiday Calendar is written in Microsoft Visual Basic, version 3.0.  The holiday database is maintained using Visual Basic's database support.

Access

The Holiday Calendar is stored in a Microsoft Access 2.0 database.  Standard Access functions can be used to manage the database.  For example: You could easily create a report which lists your organizations holidays by opening the Holiday Database in Access.  Use the report Wizard.

Components

See: System Components for a list of the components provided with the product.

Controls

The Holiday Calendar uses the following controls:

CMDIALOG.VBX	Common Dialog, for fonts and files
ThreeD.VBX	3D Controls provided with professional VB.
TrueGrid.VBX	A bound grid provided by Apex Software.

These components are not distributed with the product.  Most users already have these controls.  CMDIALOG.VBX, and ThreeD.VBX are provided with Visual Basic from Microsoft.

If you need TrueGrid.VBX download file TGDemo.Exe from the CompuServe MSBasic forum.  File size is about 275K.  TrueGrid.VBX is a proprietary product of Apex Software Corp., 800-858-APEX, CompuServe: 71053,1062.  If you plan to modify the Holiday Calendar's source code with Visual Basic you will need a license from Apex to use TrueGrid.VBX in a development environment.

Dynamic Link Libraries

Holiday Calendar requires the following DLL's:

  VBRun300.DLL	Visual Basic run time library
  VBDB300.DLL	Visual Basic database library
  MSAJT112.DLL	VB Compatibility Layer
  MSAJT200.DLL	Access Engine

These components are not distributed because they are large [taking a long time to download] and most user's already have them.  Contact The Bridge for copies of these components if you need them.  Most are available in the MSBasic Forum.

Holiday Calendar optionally uses one of the following DLL's:

  CTL3D.DLL or	3D title and common dialogs, optional
  CL3DV2.DLL	Version 2 of above

CTL3D.DLL and CTL3DV2.DLL are provided with a number of Microsoft products, including Word for Windows and Excel.  The Holiday Calendar will operate properly without these DLLs.  Common dialogs [find database, change fonts] will be displayed with a 3D effect if either is found on the user's system.

Share.Exe

Microsoft's Access uses the record locking support provided by Share.Exe.  Be sure to load Share before running HolCal.  Share is not needed if you are running Windows For Workgroups 3.11.  WFW provides it own share support.


 The Demo Programs

Two demonstration programs are provided with the Holiday Calendar, HolDmo and HolSmpl.

HolDmo - A More Elaborate Demo

A demonstration program, HolDmo, demonstrates DDE linkage between the Calendar and an application program.  Click on each section of the following graphic for an explanation of the demo program functions.  There are six hot spots on this graphic.

HolSmpl - A Very Simple Demo

Only the essential code needed to link to the Holiday Calendar is shown in this demo project.  Use Visual Basic to review the HolSmpl.Mak project.  See: Simple Linkage to Holiday Calendar for details.


Simple Linkage to Holiday Calendar

HolSmpl.Frm Code

Perform the following functions to run the "simple" demo:

1.	Use Visual Basic to load project HolSmpl.Mak.  It loads the code shown in the sample.  The following form is created:

2.	Run the program.

3.	Click the command to link to the calendar.

Note:  You may need to run the Holiday Calendar at least once before running this sample if the it was moved to another directory.  Holiday Calendar stores it application's directory in the HolCal.Ini file in the Windows directory.  The linkage subroutine looks in this ini file to find the Holiday Calendar.

Technical

Linkage is accomplished by calling the HCL_LinkToCalendar function.  For example:

Rtn = HCL_LinkToCalendar(TheBoxDate, TheLabelStatus, TheLabelMessage, ForceStartIfFails, CloseCalendar)

Where:

TheBoxDate	Date passed in this text box
TheLabelStatus	Status from the Holiday Calendar
TheLabelMessage	Message from this subroutine
ForceStartIfFails	If true, then try to start the Holiday Calendar
CloseCalendar	If true, send command to terminate the Holiday Calendar

Returns:

True	Function was successful
False	Function was not successful

Linkage Constants:

HCL_FORCESTART = True	Force shell if Calendar not already running
HCL_FORCESTARTNO = False	Just try to link, no shell
HCL_CLOSECALENDAR = True	Send closing message
HCL_CLOSECALENDARNO = False	Don't send the closing message

Sample Linkage

Initial program entry, link if calendar already started:

  Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, HCL_FORCESTARTNO, HCL_CLOSECALENDARNO)

Force linkage even if the calendar is not started:

  Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, HCL_FORCESTART, HCL_CLOSECALENDARNO)

Terminate the calendar if we started it:

  Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, 0, HCL_CLOSECALENDAR)


Simple Linkage to Holiday Calendar Example
HolSmpl.Frm  - Simplest Linkage to Holiday Calendar

VERSION 2.00
Begin Form FormSimple
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Double
   Caption         =   "Simplest Call to Holiday Calendar"
   ClientHeight    =   2715
   ClientLeft      =   765
   ClientTop       =   3750
   ClientWidth     =   5205
   ControlBox      =   0   'False
   Height          =   3150
   Left            =   690
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2715
   ScaleWidth      =   5205
   Top             =   3390
   Width           =   5355
   Begin CommandButton Command2
      Cancel          =   -1  'True
      Caption         =   "E&xit"
      Height          =   495
      Left            =   4200
      TabIndex        =   2
      Top             =   2040
      Width           =   855
   End
   Begin CommandButton Command1
      Caption         =   "&Link to the Holiday Calendar"
      Default         =   -1  'True
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   2040
      Width           =   3975
   End
   Begin TextBox Text1
      Height          =   285
      Left            =   120
      TabIndex        =   0
      Text            =   " Date Box"
      Top             =   120
      Width           =   4935
   End
   Begin Label Label2
      Alignment       =   2  'Center
      BackColor       =   &H80000002&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " Message Box"
      ForeColor       =   &H80000009&
      Height          =   750
      Left            =   120
      TabIndex        =   4
      Top             =   1200
      Width           =   4935
   End
   Begin Label Label1
      Alignment       =   2  'Center
      BackColor       =   &H80000002&
      BorderStyle     =   1  'Fixed Single
      Caption         =   " Status Box"
      ForeColor       =   &H80000009&
      Height          =   630
      Left            =   120
      TabIndex        =   3
      Top             =   480
      Width           =   4935
   End
End

' HolSmpl.Frm - Simplest example of linking to the Holiday Calendar
' 95/02/19 Copyright 1995, Larry Rebich, The Bridge, Inc.
    Option Explicit
    DefInt A-Z

Sub Command1_Click ()
' connect to the Holiday Calendar
    Dim Rtn As Integer
    Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, HCL_FORCESTART, HCL_CLOSECALENDARNO)
End Sub

Sub Command2_Click ()
' Ending...
    ' HCL_CLOSECALENDAR causes it to end if we started it
    Dim Rtn As Integer
    Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, 0, HCL_CLOSECALENDAR)
    End         'done, bye
End Sub

Sub Form_Load ()
' begin
    Move 10, (Screen.Height - Height) \ 2   'locate the form
    Text1 = Format$(Now, "Short Date")      'today is the starting date

    ' Link to the calendar if it is already running,
    ' HCL_FORCESTARTNO skips link if it is not running.
    Dim Rtn As Integer
    Rtn = HCL_LinkToCalendar(Text1, Label1, Label2, HCL_FORCESTARTNO, HCL_CLOSECALENDARNO)
End Sub

Sub Text1_KeyPress (KeyAscii As Integer)
' User presses Enter and causes the date to be passed to the calendar.
' The user could enter any date then press enter.
' A Bad Date message is returned if the date is invalid.
    If KeyAscii = 13 Then   'Enter pressed
        KeyAscii = 0        'no beep
        Command1_Click      'force sending of date to the calendar
    End If
End Sub


Registering or Ordering Holiday Calendar
Registering the Holiday Calendar

You can register and order the Holiday Calendar's Visual Basic source code:

Using CompuServe's Shareware Registration [GO SWREG, 4804], or

Directly from The Bridge:

Send a CompuServe message [to 71662,205 with credit card info],
Mail [use this form],
Fax [fax this form, the fax number is shown below], or
Phone [the number is shown below].

Click the Print button to print this order form.

Holiday Calendar Components:

To review a list of components click here.

Send the Holiday Calendar to:

Name:	_________________________________________

Company:	_________________________________________

Address:	_________________________________________

City/State/ZIP	_________________________________________

Phone:	_________________________________________

CompuServe:	_________________________________________

Price:

Product: 	$19.95 US  [California purchasers, add appropriate sales tax.]
Shipping: 	$3.95

Payment Method:

Check          Visa          MasterCard

If Credit Card, Number: ________________________________,

Expires: ________  or order by phone: 415-737-0870

If Check, make payable to and Mail to:

913 Hacienda Way
Millbrae, CA  94030
CompuServe: 71662,205
415-737-0870
Fax: 415-737-0871

License Agreement

See: Registered User License


Holiday Calendar - Demo Version License

Please click the Exit button to confirm your acceptance of this agreement.  This agreement is displayed the first time you access the Holiday Calendar.  It is not displayed during subsequent uses.

License Agreement and Warranty Disclaimer

You should carefully read the following terms and conditions before using this software.  Use of this software indicates your acceptance of these terms and conditions.  If you do not agree with them do not use the software.

Shareware Version

You are hereby licensed to use the Shareware Version of the software for a 33 day evaluation period; make as many copies of the Shareware version of this software and documentation as you wish; give exact copies of the original Shareware version to anyone; and distribute the Shareware version of the software and documentation in its unmodified form via electronic means.  There is no charge for any of the above.

You are specifically prohibited from charging, or requesting donations, for any such copies, however made; and from distributing the software and/or documentation with other products (commercial or otherwise) without prior written permission, with one exception:  Disk Vendors approved by the Association of Shareware Professionals are permitted to redistribute Holiday Calendar, subject to the conditions in this license, without specific written permission.

Unregistered use of Holiday Calendar after the 33 day evaluation period is in violation of federal copyright laws.

Evaluation and Registration

This is not free software.  This license allows you to use this software for evaluation purposes without charge for a period of 33 days.  If you use this software after the 33 day evaluation period a registration fee is required.

To register see: Registering or Ordering the Holiday Calendar.

Limited Warranty

The Bridge warrants that The Product will function substantially as described in The Product's Help file documentation [HolCal.Hlp] if used in accordance with instructions contained therein.

EXCEPT FOR THE LIMITED WARRANTY EXPRESSLY PROVIDED IN THIS SOFTWARE LICENSE AGREEMENT AND LIMITED WARRANTY, NO OTHER WARRANTIES ARE PROVIDED BY THE BRIDGE.  THE BRIDGE SPECIFICALLY EXCLUDES ANY AND ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF COMMERCIAL VIABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND LIMITS YOUR REMEDY TO RETURN OF THE FAULTY SOFTWARE WITHIN 90 DAYS OF RECEIPT.  THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS.  YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE TO STATE.  SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

THE BRIDGE DISCLAIMS ANY LIABILITY FOR INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU.

Interpretation

This License shall be construed in accordance with the laws of the State of California and constitutes the sole and exclusive agreement and understanding between the Licensee and The Bridge.

 Inc.
913 Hacienda Way
Millbrae, CA  94030

CompuServe 71662,205
415-737-0870
Fax: 415-737-0871
Copyright 1995


Holiday Calendar - Registered Version License
Holiday Calendar - Registered User License

License Agreement and Warranty Disclaimer

You should carefully read the following terms and conditions before using the Holiday Calendar.  Its use indicates your acceptance of these terms and conditions.  If you do not agree with them do not use the software.

Licensed

The Bridge, Inc., (hereafter The Bridge), hereby grants a License to the Licensee to use the Holiday Calendar (hereafter The Product) under the following conditions:

1.	on a single computer system that contains only one central processing unit that can access The Product;

2.	to create application software using The Product, including the trade secrets and confidential information contained therein, and to incorporate in such application software the files provided with The Product.

3.	to distribute the following Product files royalty free:

HolCal.Exe	Holiday Calendar
HolCal.Hlp	Help File
HCxxxxxx.Lic	The Licensees' License File

4.	to make two copies of The Product for archival purposes only.

Not Licensed

No License is granted to:

1.	transfer to any third-party The Product's source code, object code, or libraries derived from The Product, except those files identified in paragraph 3 above; or

2.	to create derivative works of The Product.

Termination

This license is effective until terminated.  You may terminate this License by destroying all copies of The Product in your possession.  The Bridge may terminate this License immediately if you fail to observe any of the terms of this license.  If terminated you must destroy all copies of The Product immediately, or return them to The Bridge.

Copyright Ownership

The Product is owned by The Bridge and is protected under the copyright laws of the United States and international treaty provisions.  Notwithstanding the copyright, The Product contains trade secrets and confidential information of The Bridge which remains the property of The Bridge.  The Bridge reserves all rights not expressly granted to the Licensee in this License.

Limited Warranty

The Bridge warrants that The Product will function substantially as described in The Product's Help file documentation [HolCal.Hlp] if used in accordance with instructions contained therein.

EXCEPT FOR THE LIMITED WARRANTY EXPRESSLY PROVIDED IN THIS SOFTWARE LICENSE AGREEMENT AND LIMITED WARRANTY, NO OTHER WARRANTIES ARE PROVIDED BY THE BRIDGE.  THE BRIDGE SPECIFICALLY EXCLUDES ANY AND ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF COMMERCIAL VIABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND LIMITS YOUR REMEDY TO RETURN OF THE FAULTY SOFTWARE WITHIN 90 DAYS OF RECEIPT.  THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS.  YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE TO STATE.  SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

THE BRIDGE DISCLAIMS ANY LIABILITY FOR INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU.

Interpretation

This License shall be construed in accordance with the laws of the State of California and constitutes the sole and exclusive agreement and understanding between the Licensee and The Bridge.

 Inc.
913 Hacienda Way
Millbrae, CA  94030

CompuServe 71662,205
415-737-0870
Fax: 415-737-0871
Copyright 1995


About the Holiday Calendar

The Holiday Calendar is a proprietary product of:

 Inc.
913 Hacienda Way
Millbrae, CA  94030
CompuServe: 71662,205
415-737-0870
Fax: 415-737-0871


Development History

Version 2.0 - March 1995

The system was renamed from Space Calendar to Holiday Calendar.

Significant Enhancements

Paint the Dates - The original version used a VB image control for each date box.  There were 49 of them.  In version 2.0 the date boxes are "painted" on the form.  49 controls were eliminated.  The calendar uses significantly less Window's resources and loads much faster.

Holiday Description - A holiday description is displayed as a "tool tip" when the mouse is moved over a holiday.  See: Keyboard for details.

DDE Linkage - The DDE linkage was vastly simplified.  All linkage can be accomplished with one function call.  See: Simple Linkage to Holiday Calendar for details.

Startup - The startup process performs a number of validation checks.  For example, the system uses Windows API OpenFile to try to find its holiday database and only prompts for the location if it can't find it.  See: Holiday Database for an example.

Other Enhancements

Smaller Size - The calendar takes less desktop space.  The title can be eliminated.  The calendar can be minimized.  While minimized it displays the time and date.

Settings Saved - User customized settings are saved in the HolCal.Ini file.  The file is stored in the user's Window's directory.  That makes it possible for the Holiday Calendar to be shared on a network - including the holiday database.

Change Fonts - The user can select a font other than the default.  It is sometimes necessary to select a different font if the calendar dates are not displayed properly.

Help File - This help file was extensively revised to reflect the system's new features and capabilities.

Version 1.0 - March 1994

The initial version was first distributed in March 1994.  It was called Space Calendar.  It is used with the room reservation system being developed by The Bridge.  Space Calendar was posted on CompuServe in the MSBasic forum.  There were about 280 "downloads" of the system, but only a handful of sales.


System Components

Visual Basic Source Code

AUTHOR.BAS	Author's information
CHGFONT.BAS	Change all fonts on a form
DELAY.BAS	Delay function
GETPATH.BAS	Get the path or name from a full path name string
HOLCAL.TXT	Indexes used with the help system
HOLCLND2.FRM	Main calendar form
HOLCLNDR.BAS	Subroutines and functions
HOLCLNDT.FRM	Select a Date form
HOLCLNH.FRM	Holiday form
HOLCLNHN.FRM	New holiday form
HOLCMAIN.BAS	Main entry subroutine
HOLCMDIA.FRM	Common Dialog form
HOLDMO.BAS	Demo subroutines and functions
HOLDMO.FRM	Demo form
HOLGLB.BAS	Global variables and constants
HOLLINK.BAS	DDE linkage subroutines and functions
HOLREGIS.BAS	Registration information
HOLSMPL.FRM	Simplest linkage example
HOLTIP.FRM	Holiday description form
HOLVBGLB.BAS	VB constants
MOUSESET.BAS	Mouse set and restore
MSGBOX3D.BAS	3D Message Box subroutines and functions
MSGBOX3D.FRM	3D Message Form
WINDIR.BAS	Get windows directory

Other

HOLCAL.MDB	Holiday database, Access format
HOLCAL.ICO	Icon
HCDEMO.LIC	Demo License file
HCxxxxxx.LIC	Registered System License file
HOLCAL.INI	Is "built" and stored in the Windows directroy

Used But Not Supplied

These components are not supplied because most users have them.  If you do not have one of these items then contact The Bridge and we will be happy to supply the item.

CMDIALOG.VBX	Common Dialog, for fonts and files
CTL3D.DLL or	3D title and common dialogs, optional
CTL3DV2.DLL	Version 2 of above
MSAJT112.DLL	Access 2.0 VB Compatibility Layer
MSAJT200.DLL	Access 2.0 Engine
THREED.VBX	3D controls
TRUEGRID.VBX	Grid used to display Holiday information
VBDB300.DLL	VB's data handler
VBRUN300.DLL	VB's run-time component

Except for TrueGrid.VBX, the above products are either a proprietary or licensed product of Microsoft Corp.

TrueGrid.VBX is a proprietary product of Apex Software Corporation.  Phone: 800-858-APEX, CompuServe: 71053,1062.  If you plan to modify the Holiday Calendar code with Visual Basic you will need a license from Apex to use TrueGrid.VBX in development mode.

See: Holiday Calendar - Technical Information for additional information.


Other Products
Other Products from The Bridge

Other products available from The Bridge in the CompuServe MSBasic forum include:

MsgBox3D - A 3D Message Box

MsgBox3D is a functional replacement for VB's Msgbox.  Features include  the ability to customize the message, changing captions, fonts and icons.  A demo is available as MsgB3D.Exe. GO SWREG 3805 to register and receive Visual Basic source code.  $14.95 plus shipping and handling.

DemoCt3D

Demonstrates the API's needed to call Ctl3D.DLL.  Freeware.  File name: DmoC3D.Zip.  Over 900 people have downloaded this demo.

KeyState

According to information found in the Microsoft Developer's Network CD 10, KeyStat.vbx can cause a GPF under certain conditions.  We developed this freeware workaround which you my wish to use in place of the KeyStat.vbx.  File name: KeySta.Zip.  About 30 downloads.

Shade

A demo program that shows how to shade a form - similar to the Window's Setup screen.  Freeware.  File name: Shade.Zip.  Over 400 downloads.

SetTab

A demo program that shows how to set tabs in a text box.  Freeware.  File name: SetTab.Zip.  Over 700 downloads.

TstLay

Two functions that will save and restore a TrueGrid layout in a binary file.  Freeware.  File name: TstLay.Zip.  Over 250 downloads.

UppLow

A demo program that shows how to use the Windows API to force text box input to all upper or lower case.  Freeware.  File name: UppLow.Zip.  Over 30 downloads in the first 2 days on the forum.


Hot Spots

Many of the forms displayed in this help file contain "hot spot" areas.  The mouse cursor changes to a "hand" as it moves over a "hot spot".  Click the mouse on the "hot spot" to pop-up information associated with that area of the form.

Technical Note - You can use the tab key to locate "hot spots".  Then, press the Enter key to display information associated with the highlighted area.


Change Month or Year

Click the left [image] or right [image] month panel buttons to add or subtract one month from the currently displayed date.

Do likewise on the year panel to add or subtract one year.


Change Day

Click the desired day or use the short-cut keys to change the date.  See the Calendar Menu for a list of the short-cut keys.


Display Menu

Click the menu button to display the calendar's menu.  See the Calendar Menu for details.


Cancel, Today, Select Date, Close, Minimize

Select Cancel, or press Esc, to close the menu.

Select Today or press the "T" key to display today's date.  This menu item is disabled if today's date is the current selection.

Jump to a new date by selecting menu item "Select a Date" or by pressing "S" while displaying the calendar.  Enter the new date then press Enter.

Select Close or press Alt-F4 terminate the calendar.

Select Minimize or press the "M" key to minimize the calendar.


Previous, Next, First and Last

When you select menu item Previous, Next, First or Last a sub menu appears allowing you to jump to another date.  Use the short-cut keys to quickly perform the desired jump.


Holiday Selection

Turn on or off the display of holidays or display the holiday database entry screen by selecting these menu items.

The Holiday Calendar searches for its holiday database when it is opened.  First it looks in the directroy named in the HolCal.Ini file.  If not there it looks in its directroy.  It then issues a general search using Window's API OpenFile.  If all this fails then Holiday Calendar asks you to help it find the database.  The following screen is displayed:

You can define a different holiday database by selecting menu item Change Database Path.


Center, Always On Top, Title Bar, Fonts

The calendar's location is saved between sessions in the HolCal.Ini file.

Select the Center menu item, or "C", to center the calendar on the screen.  Once centered, the calendar can be moved back to it's previously loaded location by pressing "R" or selecting the Reset Location menu item.  The menu item's caption is toggled between "Center" and "Reset Location" based upon the current location of the calendar on the screen.

Check the "Always On Top" menu item to cause the calendar to always be visible [on top of other applications].

Check the "Title Bar" menu item to cause the calendar to be displayed without a title bar.  The form can be moved by dragging any empty date box.

Change Font - You can change the Calendar's font name and size.  You may find that the default font is too small, or overlaps from day box to day box.  Try using a different font.  The default font is MS Sans Serif.  You could try using Arial or some other proportional font.  A portion of the font dialog selection box is displayed:

Note: The Holiday Calendar does not change the font style.  Ignore this selection item.


Help, About, Registration

Help - Press F1 or select the Help menu item to display this help file.

About - Display an About message.

Registration - Display product registration information, for example:


Pop Up

The Windows Help engine [WinHelp.Exe] can start a secondary [pop up] help window.  The secondary window is most commonly used to display a definition of the highlighted text.

This is an example of a pop up screen.


Date

The Date field is a "two way" text box.  If you enter a date, then press the Enter key, the date is passed to the calendar program.  The passed date becomes the "selected" date in the calendar.  A link is attempted after Enter is pressed.

Entered dates can be in almost any format, for example: January 1, 1994, 1/1/94, 1-1-94, 1/1 [the current year is used].  The Visual Basic date conversion routines are used.  See the Visual Basic DateValue function help information for details.

If the calendar is active and a new date is selected that new date will appear in this field.

The format of the date is based upon the setting in the Window's Control Panel, International, Date Format, Short Date Format.  The calendar will return dates for years other than 19xx only if the Century option is set with the Short Date Format.


Calendar Status

Messages from the calendar program are displayed here.


Message

Messages created by the linkage function [HCL_LinkToCalendar] are displayed here.


Calendar Command Button

Click this button to load the calendar program, if not loaded, and link the date and status fields.

The demo program first attempts a DDE link with the calendar.  If the DDE link fails the demo program attempts to load the calendar and then retries the DDE link.

It is possible for more than one application program to share the calendar.

Only the application that loaded the calendar will attempt to close it - the program issuing the Shell command.


Exit

Terminate the demo.

The demo will also terminate the calendar if the demo program caused the calendar to be loaded [issued the Shell command].


Help

Display this help file.


Description

A description of the holiday.  Maximum 40 characters.


Day

The day of the week.  Not an editable field.  Change the date to cause this field to be changed.


Date

The date of the holiday.  The date can be entered in almost any recognizable format.  Some examples: Oct 13, 1938, October 13, 1938, 10/13/38, 10-13-1938, 10/13 [current year is used].  The date field can be blank, probably not a desirable feature.

The input field can not be exited if an invalid date is entered.  Press Esc to exit if a valid date can't be entered.


Day Off

Is this date a "company" holiday?  Is it a "day off?"  Select Yes or No from the drop down options.


Recurring Holiday

Does this holiday occur on the same day each year.  For example: Christmas, Independence Day.  Recurring holidays need only be entered one time for the calendar to display the holiday each year.  Select Yes or No from the drop down options.


MM-DD, Month Day

The month and day of the holiday.  You can sort on this field to easily determine if more than one holiday, even a recurring one, falls on the say day of the year.

Not an editable field.  Change the date to cause this field to be changed.


Data Bar

Use the data bar to position the grid to the first, previous, next or last row by clicking on the appropriate data bar button.


Add

Add a holiday.  A sample screen:

The holiday name is required.  The date is not.  Also indicate whether this is a "day off" and if the holiday occurs on the same day each year [is recurring].

You can define more than one holiday per day.  A description is displayed for each.  For example:


Delete

Delete the holiday.  Click the "yes" button to delete the holiday.  Click "no" to cancel the deletion request.  A sample screen:


Close

Close the holiday screen and return to the calendar.  The calendar is displayed with the date of the last holiday selected.


File

Only one option is available in the file menu - Close.  Selecting Close is the same as clicking the Close button.


Sort

Various holiday schedule sort options are provided.  This setting is saved in the HolCal.Ini file.  The sort menu:

The schedule can be sorted in Ascending or Descending sequence.  The menu caption is toggled.  The caption indicates what the sort sequence will be after the item is selected.


Select

Select all, a year's worth, or a month's worth of records.  These menu items change depending upon which holiday record is currently selected.  In this example, the 1995 records would be selected.

Select menu item "Days Off Only" to only display holidays defined as "days off".


Holiday Window

You can center the screen or restore the "factory settings."  Screen settings are store in an HolCal.Ini file and restored when the holiday schedule form is reloaded.  The Window menu:


HolCal.Ini File

A sample Holiday Calendar initialization file:

; HolCal.Ini - Holiday Calendar Initialization File
; 95/02/20 Copyright 1995, Larry Rebich, The Bridge, Inc.
; 95/03/02 Created this date.

[Files]
Database Path=g:\database\holcal
Application Path=f:\windows\holcal

[Calendar]
Left=945
Top=645
Always On Top=False
Title Bar=True
Show Holidays=True

[Holidays]
Screen Maximized=False
Left=960
Top=1725
Width=8670
Height=5760
Sort By=Date
Sort Sequence=Ascending

[Fonts]
Proportional=MS Sans Serif
Proportional Size=8.25


HolSmpl.Mak

The HolSmpl.Mak file:

HOLSMPL.FRM
HOLLINK.BAS
ProjWinSize=9,554,235,190
ProjWinShow=2
IconForm="FormSimple"
Title="HOLSMPL"
ExeName="HOLSMPL.EXE"


Last Help Topic

You can only display this screen by scrolling sequentially through the HolCal help file or by searching for topic "Scrolling a Help File".  If you scrolled into this topic it means you used the technique described below.

Scrolling a Help File

You can scroll sequentially through any WinHelp file.  Do the following:

1.	Insert SeqTopicKeys=1 in the Windows Help section of the Win.Ini file.
For example:

[Windows Help]
.....
SeqTopicKeys=1

2.	Use the Shift+Ctrl+Right Arrow key combination to scroll forward one topic.  Jump to the first topic with Shift+Ctrl+Home.  Go back a screen by pressing Ctrl+B [the standard WinHelp command].

The author discovered this tidbit in PC Magazine, March 15, 1994, page 309.